﻿using GN.Pay.Core.Entities;
using GN.Pay.TradeChannel;
using GN.Pay.TradeChannel.Transfers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.Application.GatewayApp
{
    /// <summary>
    /// 付款通知应用服务
    /// </summary>
    public interface ITradeNotifyAppService : IPayAppService, INotifyService, ITransfersNotifyService
    {
        /// <summary>
        /// 根据交易号获取通道
        /// </summary>
        /// <param name="tradeNo">交易号</param>
        /// <returns></returns>
        ITradeChannel GetPayTradeChannel(string tradeNo);

        /// <summary>
        /// 根据退款批号获取通道
        /// </summary>
        /// <param name="refundNo">退款交易号</param>
        /// <returns></returns>
        ITradeChannel GetRefundTradeChannel(string refundNo);

        /// <summary>
        /// 获取缓存
        /// </summary>
        /// <param name="tradeNo">交易号</param>
        /// <returns></returns>
        TradeNotify GetCacheTradeNotify(string tradeNo);
    }
}
